/*
 * Copyright 2020-2024 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.kaadog.kcg.core.mapping;

import java.io.Serializable;

import com.kaadog.kcg.core.configuration.DialectConfiguration.TypeMappingConfiguration;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Column implements Serializable {

    private static final long        serialVersionUID        = -4104378105904177409L;

    private String                   catalog                 = "";
    private String                   schema                  = "";
    private String                   tableName               = "";

    /** 列名 */
    private String                   columnName              = "";

    /** 数据类型 */
    private String                   dataType                = "";
    /** 列长度 */
    private int                      columnSize;
    /** 列的小数位数 */
    private int                      decimalDigits;
    /** 列的基数 */
    private int                      numPrecRadix;
    /** 是否为空 */
    private Boolean                  isNullable              = Boolean.TRUE;
    /** 默认值 */
    private String                   columnDef               = "";
    /** 顺序 */
    private int                      ordinalPosition;
    /** 注释 */
    private String                   columnComment           = "";

    /** 字段名称 */
    private String                   fieldName               = "";
    /** 字段名称，首字母大写 */
    private String                   fieldNameFirstUpperCase = "";

    /** 字段类型 */
    private TypeMappingConfiguration fieldType               = new TypeMappingConfiguration();

}
